package net.seehealth.healthpad.ui.view;

import net.seehealth.healthpad.R;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

public class DiseaseRiskItemView extends RelativeLayout {
	private Context mContext;
	
	/**
	 * 标题
	 */
	private TextView mTitle;
	
	/**
	 * 描述
	 */
	private TextView mContent;
	public DiseaseRiskItemView(Context context) {
		super(context);
		this.mContext = context;
		initialize();
		// TODO Auto-generated constructor stub
	}
	
	/**
	 * 初始化视图
	 */
	private void initialize() {
		
		View view = LayoutInflater.from(mContext).inflate(
        		R.layout.ch_assessment_des_item, null);
		addView(view, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));

		mTitle = (TextView)findViewById(R.id.tv_ch_assessment_des_title);
		mContent = (TextView)findViewById(R.id.tv_ch_assessment_des_content);
		
	}
	/**
	 * 刷新视图
	 * @param name 任务名
	 * @param index 任务下标
	 */
	public void updateView(String title, String content) {
		mTitle.setText(title);
		mContent.setText(content);
	}


}
